﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sealight.Core.Domain
{
   public class ProductSpecificationAttributeEntity:BaseEntity
    {
        /// <summary>
        /// Gets or sets the product specification attribute identifier
        /// </summary>
        public virtual Guid ProductSpecificationAttributeID { get; set; }

        /// <summary>
        /// Gets or sets the product identifier
        /// </summary>
        public virtual ProductEntity Product { get; set; }

        /// <summary>
        /// Gets or sets the specification attribute option identifier
        /// </summary>
        public virtual SpecificationAttributeOptionEntity Option { get; set; }

        /// <summary>
        /// Gets or sets whether the attribute can be filtered by
        /// </summary>
        public virtual bool AllowFiltering { get; set; }

        /// <summary>
        /// Gets or sets whether the attrbiute will be shown on the product page
        /// </summary>
        public virtual bool ShowOnProductPage { get; set; }

        /// <summary>
        /// Gets or sets the display order
        /// </summary>
        public virtual int DisplayOrder { get; set; }

        public virtual Sealight.Core.DataAdapter.product_specification_attribute ToDataAdapter()
        {
            return new DataAdapter.product_specification_attribute {id=this.ProductSpecificationAttributeID, allow_filtering = this.AllowFiltering, display_order=this.DisplayOrder, show_on_product_page=this.ShowOnProductPage,
            option = this.Option.ToDataAdapter(), product=this.Product.ToDataAdapter()};
        }
    }
}
